cargo.git
9 years agoAdd color support for Windows consoles.
skeleten [Sun, 26 Jun 2016 13:03:08 +0000 (15:03 +0200)]
Add color support for Windows consoles.

Fixes #2803

9 years agoAuto merge of #2795 - alexcrichton:test-and-harness, r=brson
bors [Tue, 21 Jun 2016 15:41:22 +0000 (08:41 -0700)]
Auto merge of #2795 - alexcrichton:test-and-harness, r=brson

Fix `harness = false` on `[lib]` sections

Now that this is fixed upstream, we can actually add a test for this!

Closes #2305

9 years agoFix `harness = false` on `[lib]` sections
Alex Crichton [Mon, 20 Jun 2016 16:28:09 +0000 (09:28 -0700)]
Fix `harness = false` on `[lib]` sections

Now that this is fixed upstream, we can actually add a test for this!

Closes #2305

9 years agoAuto merge of #2793 - matklad:doc-fix, r=alexcrichton
bors [Mon, 20 Jun 2016 03:57:21 +0000 (20:57 -0700)]
Auto merge of #2793 - matklad:doc-fix, r=alexcrichton

Fix reference to the guide in the docs

Overrides description was moved from the Guide to the Specifying
Dependencies section.

It would be nice to provide a hyperlink here, but I guess it is not possible.

9 years agoFix reference to the guide in the docs
Aleksey Kladov [Sun, 19 Jun 2016 22:42:11 +0000 (01:42 +0300)]
Fix reference to the guide in the docs

Overrides description was moved from the Guide to the Specifying
Dependencies section.

9 years agoAuto merge of #2788 - Manishearth:improve-help, r=alexcrichton
bors [Sun, 19 Jun 2016 22:10:59 +0000 (15:10 -0700)]
Auto merge of #2788 - Manishearth:improve-help, r=alexcrichton

Clarify where full list of subcommands can be found

None

9 years agoClarify where full list of subcommands can be found
Manish Goregaokar [Sat, 18 Jun 2016 13:19:13 +0000 (14:19 +0100)]
Clarify where full list of subcommands can be found

9 years agoAuto merge of #2787 - alexcrichton:links-with-dots, r=brson
bors [Fri, 17 Jun 2016 15:01:14 +0000 (08:01 -0700)]
Auto merge of #2787 - alexcrichton:links-with-dots, r=brson

Don't re-look-up tables to avoid dots problem

If a `links` value has a `.` in the name Cargo would previously panic, but this
alters the code to be more principled about lookup in tables to ensure that we
don't misinterpret the names.

Closes #2786

9 years agoDon't re-look-up tables to avoid dots problem
Alex Crichton [Fri, 17 Jun 2016 11:10:29 +0000 (04:10 -0700)]
Don't re-look-up tables to avoid dots problem

If a `links` value has a `.` in the name Cargo would previously panic, but this
alters the code to be more principled about lookup in tables to ensure that we
don't misinterpret the names.

Closes #2786

9 years agoAuto merge of #2630 - alexcrichton:build-script-warnings, r=brson
bors [Tue, 14 Jun 2016 14:36:08 +0000 (07:36 -0700)]
Auto merge of #2630 - alexcrichton:build-script-warnings, r=brson

Add build script warnings, streaming output from build scripts to the console

These commits add a few features to Cargo:

* Cargo now recognizes the `warning` key in build scripts and will print warnings *after a build script has completed* if the build script is for a path dependency. That is, if a build script prints `cargo:warning=foo` then Cargo will forward that to the console if the crate's being developed.

* Cargo now accepts multiple `-v` flags for all commands. The `-vv` flag prints warnings for *all* upstream crates, not just the local ones.

* When the `-vv` flag is passed Cargo will stream the output of all build scripts to the console, allowing more easy debugging of what happened if the build fails later on.

More details can be found in each commit, and otherwise this

Closes #1106

9 years agoStream build script output to the console
Alex Crichton [Thu, 14 Apr 2016 06:37:57 +0000 (23:37 -0700)]
Stream build script output to the console

This commit alters Cargo's behavior when the `-vv` option is passed (two verbose
flags) to stream output of all build scripts to the console. Cargo makes not
attempt to prevent interleaving or indicate *which* build script is producing
output, rather it simply forwards all output to one to the console.

Cargo still acts as a middle-man, capturing the output, to parse build script
output and interpret the results. The parsing is still deferred to completion
but the stream output happens while the build script is running.

On Unix this is implemented via `select` and on Windows this is implemented via
IOCP.

Closes #1106

9 years agoAllow specifying -v multiple times
Alex Crichton [Tue, 12 Apr 2016 21:55:19 +0000 (14:55 -0700)]
Allow specifying -v multiple times

This commit modifies the CLI interface to allow the verbose (-v) flag to be
specified multiple times. This'll be used soon to have `-vv` indicate that more
output should be generated than `-v` during a normal build.

Currently this commit changes the behavior of whether warnings are printed to
print warnings for the **entire DAG of dependencies** if `-vv` is specified.
That is, `--cap-lints` is never passed nor is any warning from build scripts if
`-vv` is specified.

9 years agoForward warnings from build scripts
Alex Crichton [Tue, 12 Apr 2016 21:28:52 +0000 (14:28 -0700)]
Forward warnings from build scripts

This adds support for forwarding warnings from build scripts to the main console
for diagnosis. A new `warning` metadata key is recognized by Cargo and is
printed after a build script has finished executing.

The purpose of this key is for build dependencies to try to produce useful
warnings for local crates being developed. For example a parser generator could
emit warnings about ambiguous grammars or the gcc crate could print warnings
about the C/C++ code that's compiled.

Warnings are only emitted for path dependencies by default (like lints) so
warnings printed in crates.io crates are suppressed.

cc #1106

9 years agoAuto merge of #2720 - alexcrichton:ignore-nfs-more-often, r=brson
bors [Sun, 12 Jun 2016 15:18:50 +0000 (08:18 -0700)]
Auto merge of #2720 - alexcrichton:ignore-nfs-more-often, r=brson

Ignore file locks on OSX NFS mounts

We already ignore NFS on Linux so let's do the same on OSX as well.

9 years agoIgnore file locks on OSX NFS mounts
Alex Crichton [Thu, 19 May 2016 19:09:00 +0000 (12:09 -0700)]
Ignore file locks on OSX NFS mounts

We already ignore NFS on Linux so let's do the same on OSX as well.

9 years agoAuto merge of #2741 - alexcrichton:cdylib, r=brson
bors [Sun, 12 Jun 2016 13:03:28 +0000 (06:03 -0700)]
Auto merge of #2741 - alexcrichton:cdylib, r=brson

Add support for cdylib crate types

And while we're at it this also extends support for all future crate types
assuming that they aren't linkable by default.

9 years agoAuto merge of #2680 - alexcrichton:update-toml, r=brson
bors [Sun, 12 Jun 2016 12:21:23 +0000 (05:21 -0700)]
Auto merge of #2680 - alexcrichton:update-toml, r=brson

Update TOML parser to pick up a bugfix

Cargo has previously accepted invalid TOML as valid, but this bugfix should fix
the problem. In order to prevent breaking all crates immediately toml-rs has a
compatibility mode which emulates the bug that was fixed. Cargo will issue a
warning if this compatibility is required to parse a crate.

9 years agoAuto merge of #2668 - alexcrichton:dont-warn-about-metadata, r=brson
bors [Sun, 12 Jun 2016 11:46:54 +0000 (04:46 -0700)]
Auto merge of #2668 - alexcrichton:dont-warn-about-metadata, r=brson

Don't warn about `metadata` keys in the manifest

External tools may want to store metadata in `Cargo.toml` that they read but
Cargo itself doesn't read. For example `cargo-apk` uses this for pieces of
configuration. Cargo unfortunately, however, warns about these keys as "unused
keys in the manifest"

This commit instead whitelists the `package.metadata` key to not warn about any
data inside.

9 years agoUpdate TOML parser to pick up a bugfix
Alex Crichton [Thu, 12 May 2016 18:44:00 +0000 (11:44 -0700)]
Update TOML parser to pick up a bugfix

Cargo has previously accepted invalid TOML as valid, but this bugfix should fix
the problem. In order to prevent breaking all crates immediately toml-rs has a
compatibility mode which emulates the bug that was fixed. Cargo will issue a
warning if this compatibility is required to parse a crate.

9 years agoDon't warn about `metadata` keys in the manifest
Alex Crichton [Tue, 10 May 2016 19:55:19 +0000 (12:55 -0700)]
Don't warn about `metadata` keys in the manifest

External tools may want to store metadata in `Cargo.toml` that they read but
Cargo itself doesn't read. For example `cargo-apk` uses this for pieces of
configuration. Cargo unfortunately, however, warns about these keys as "unused
keys in the manifest"

This commit instead whitelists the `package.metadata` key to not warn about any
data inside.

9 years agoAdd support for cdylib crate types
Alex Crichton [Fri, 20 May 2016 23:34:50 +0000 (16:34 -0700)]
Add support for cdylib crate types

And while we're at it this also extends support for all future crate types
assuming that they aren't linkable by default.

9 years agoAuto merge of #2781 - alexcrichton:block-if-dirty, r=brson
bors [Sat, 11 Jun 2016 02:09:39 +0000 (19:09 -0700)]
Auto merge of #2781 - alexcrichton:block-if-dirty, r=brson

Prevent packaging a crate if any files are dirty

This commit alters Cargo's behavior to prevent publishing a crate by default if
any files in that crate are determined to be dirty, that is either modified or
not part of the working tree.

This can prevent common mistakes like many listed in #2063 and enables features like https://github.com/rust-lang/cargo/issues/841.

Closes https://github.com/rust-lang/cargo/issues/1597
Closes #2063

9 years agoAuto merge of #2757 - alexcrichton:panic-profile-dox, r=brson
bors [Sat, 11 Jun 2016 01:32:24 +0000 (18:32 -0700)]
Auto merge of #2757 - alexcrichton:panic-profile-dox, r=brson

Document the `panic` profile option

Closes #2750

9 years agoAuto merge of #2704 - alexcrichton:clean-no-fetch, r=brson
bors [Sat, 11 Jun 2016 00:34:29 +0000 (17:34 -0700)]
Auto merge of #2704 - alexcrichton:clean-no-fetch, r=brson

Don't fetch all crates on clean

Only fetch those that are needed by avoiding `ops::fetch`

9 years agoAuto merge of #2779 - matklad:propagete-color-config, r=alexcrichton
bors [Fri, 10 Jun 2016 14:23:32 +0000 (07:23 -0700)]
Auto merge of #2779 - matklad:propagete-color-config, r=alexcrichton

Propagate --color option to rustc

closes #2740

Will try to add a test for this soon (and fix failing tests if any, compiling/running tests locally is slow :( ).

I am not sure what is the right place to add `--color` option to the command line. I use [`build_base_args`]. [`process`] also looks like a good candidate, because it is more general, but if we look at the [`CommandType`] we see that only `rustc` command supports `--color`.

[`build_base_args`]: https://github.com/matklad/cargo/blob/1f7504397ce7c40ff708e2d31da164822e88ed37/src/cargo/ops/cargo_rustc/mod.rs#L449
[`process`]: https://github.com/matklad/cargo/blob/1f7504397ce7c40ff708e2d31da164822e88ed37/src/cargo/ops/cargo_rustc/mod.rs#L608
[`CommandType`]: https://github.com/matklad/cargo/blob/1f7504397ce7c40ff708e2d31da164822e88ed37/src/cargo/ops/cargo_rustc/engine.rs#L102

9 years agoPrevent packaging a crate if any files are dirty
Alex Crichton [Fri, 10 Jun 2016 13:43:34 +0000 (06:43 -0700)]
Prevent packaging a crate if any files are dirty

This commit alters Cargo's behavior to prevent publishing a crate by default if
any files in that crate are determined to be dirty, that is either modified or
not part of the working tree.

This can prevent common mistakes like many listed in #2063, and subsequently...

Closes #2063

9 years agoAuto merge of #2780 - Boddlnagg:patch-1, r=alexcrichton
bors [Fri, 10 Jun 2016 13:48:41 +0000 (06:48 -0700)]
Auto merge of #2780 - Boddlnagg:patch-1, r=alexcrichton

Fix `cargo doc --open` on Windows

This fixes #2446. Note that I have not built cargo with this change, but I have tested the functionality in isolation (on Windows 10).

As to the issue itself, I don't know why the previous version didn't work, but `start` is redundant when `cmd /C` is used.

9 years agoFix `cargo doc --open` on Windows
Patrick Reisert [Fri, 10 Jun 2016 13:07:55 +0000 (15:07 +0200)]
Fix `cargo doc --open` on Windows

This fixes #2446. Note that I have not built cargo with this change, but I have tested the functionality in isolation (on Windows 10).

As to the issue itself, I don't know why the previous version didn't work, but `start` is redundant when `cmd /C` is used.

9 years agoPropagate --color option to rustc
Aleksey Kladov [Thu, 9 Jun 2016 20:55:17 +0000 (23:55 +0300)]
Propagate --color option to rustc

9 years agoAuto merge of #2778 - alexcrichton:dont-print-on-q-when-run, r=brson
bors [Fri, 10 Jun 2016 01:52:51 +0000 (18:52 -0700)]
Auto merge of #2778 - alexcrichton:dont-print-on-q-when-run, r=brson

Don't print extra info on -q + `cargo run`

If a process fails then it's probably printing out why and Cargo doesn't need to
do it all over again.

Closes #2735

9 years agoDon't print extra info on -q + `cargo run`
Alex Crichton [Thu, 9 Jun 2016 11:14:41 +0000 (04:14 -0700)]
Don't print extra info on -q + `cargo run`

If a process fails then it's probably printing out why and Cargo doesn't need to
do it all over again.

Closes #2735

9 years agoAuto merge of #2777 - matklad:harness-help, r=alexcrichton
bors [Thu, 9 Jun 2016 10:03:54 +0000 (03:03 -0700)]
Auto merge of #2777 - matklad:harness-help, r=alexcrichton

Explain how to get help for the test harness

TIL that the default test harness has a non-trivial number of options. Guess it's better to share this knowledge.

9 years agoExplain how to get help for the test harness
Aleksey Kladov [Wed, 8 Jun 2016 18:01:00 +0000 (21:01 +0300)]
Explain how to get help for the test harness

9 years agoAuto merge of #2771 - alexcrichton:update-replace, r=brson
bors [Tue, 7 Jun 2016 23:32:25 +0000 (16:32 -0700)]
Auto merge of #2771 - alexcrichton:update-replace, r=brson

Don't lock overrides if we're updating them

There was already a function for this, `keep`, it was just forgotten to be
called.

Closes #2766

9 years agoAuto merge of #2770 - alexcrichton:new-curl, r=brson
bors [Tue, 7 Jun 2016 22:52:14 +0000 (15:52 -0700)]
Auto merge of #2770 - alexcrichton:new-curl, r=brson

Update to curl 0.3

9 years agoAuto merge of #2763 - mbrubeck:native-dirs, r=alexcrichton
bors [Tue, 7 Jun 2016 08:05:44 +0000 (01:05 -0700)]
Auto merge of #2763 - mbrubeck:native-dirs, r=alexcrichton

Correctly record multiple native dirs per package

This fixes a bug when a package's build script outputs multiple library search
paths.  Because Compilation::native_dirs is a `HashMap<PackageId, PathBuf>` it
can only store one path per package.  Currently if there are multiple paths,
all but the last will be inserted and then overwritten.

The key from this map is never used anyway, so this fixes the bug by changing
it from a HashMap to a HashSet.

9 years agoTest for correct library search paths during cargo run
Matt Brubeck [Mon, 6 Jun 2016 17:09:33 +0000 (10:09 -0700)]
Test for correct library search paths during cargo run

9 years agoStrip native= prefix from -L arg before additing it to LD_LIBRARY_PATH
Matt Brubeck [Thu, 2 Jun 2016 20:53:31 +0000 (13:53 -0700)]
Strip native= prefix from -L arg before additing it to LD_LIBRARY_PATH

Fixes #2765.

9 years agoCorrectly record multiple native dirs per package
Matt Brubeck [Thu, 2 Jun 2016 18:37:32 +0000 (11:37 -0700)]
Correctly record multiple native dirs per package

This fixes a bug when a package's build script outputs multiple library search
paths.  Because Compilation::native_dirs is a `HashMap<PackageId, PathBuf>` it
can only store one path per package.  Currently if there are multiple paths,
all but the last will be inserted and then overwritten.

The key from this map is never used anyway, so this fixes the bug by changing
it from a HashMap to a HashSet.

9 years agoAuto merge of #2774 - andrehjr:patch-doc-2754, r=alexcrichton
bors [Mon, 6 Jun 2016 13:24:15 +0000 (06:24 -0700)]
Auto merge of #2774 - andrehjr:patch-doc-2754, r=alexcrichton

Document file destination of build scripts.

Close #2754

9 years agoDocument file destination of build scripts.
André Luis Leal Cardoso Junior [Mon, 6 Jun 2016 03:57:15 +0000 (00:57 -0300)]
Document file destination of build scripts.

Close #2754

9 years agoAuto merge of #2772 - knight42:patch, r=alexcrichton
bors [Mon, 6 Jun 2016 09:16:38 +0000 (02:16 -0700)]
Auto merge of #2772 - knight42:patch, r=alexcrichton

Improve autocompletion

1. Add path completion to manifest-path options
2. Support subcommand metadata

9 years agoAdd zsh autocompletion to subcommand metadata
Knight [Sun, 5 Jun 2016 10:08:20 +0000 (18:08 +0800)]
Add zsh autocompletion to subcommand metadata

9 years agozsh: add path completion to manifest-path options
Knight [Sun, 5 Jun 2016 09:45:24 +0000 (17:45 +0800)]
zsh: add path completion to manifest-path options

9 years agoDon't lock overrides if we're updating them
Alex Crichton [Sun, 5 Jun 2016 07:19:55 +0000 (00:19 -0700)]
Don't lock overrides if we're updating them

There was already a function for this, `keep`, it was just forgotten to be
called.

Closes #2766

9 years agoUpdate to curl 0.3
Alex Crichton [Wed, 18 May 2016 17:01:40 +0000 (10:01 -0700)]
Update to curl 0.3

9 years agoAuto merge of #2769 - alexcrichton:no-oom-travis, r=alexcrichton
bors [Sun, 5 Jun 2016 06:06:58 +0000 (23:06 -0700)]
Auto merge of #2769 - alexcrichton:no-oom-travis, r=alexcrichton

Pass -j1 on Travis

Looks like if we do things concurrently we hit the OOM killer, so let's not do
that!

9 years agoPass -j1 on Travis
Alex Crichton [Tue, 31 May 2016 23:44:56 +0000 (16:44 -0700)]
Pass -j1 on Travis

Looks like if we do things concurrently we hit the OOM killer, so let's not do
that!

9 years agoDocument the `panic` profile option
Alex Crichton [Tue, 31 May 2016 20:30:54 +0000 (13:30 -0700)]
Document the `panic` profile option

Closes #2750

9 years agoAuto merge of #2747 - WiSaGaN:feature/rename-main-thread, r=alexcrichton
bors [Tue, 31 May 2016 16:26:55 +0000 (09:26 -0700)]
Auto merge of #2747 - WiSaGaN:feature/rename-main-thread, r=alexcrichton

Rename main thread from '<main>' to 'main'.

This pull request resolves the test failure in rust pull request 33803
https://github.com/rust-lang/rust/pull/33803

9 years agoUse place holder for main thread name in tests
Wangshan Lu [Tue, 31 May 2016 11:43:44 +0000 (19:43 +0800)]
Use place holder for main thread name in tests

9 years agoAuto merge of #2755 - matklad:remove-useless-formats, r=alexcrichton
bors [Tue, 31 May 2016 05:03:58 +0000 (22:03 -0700)]
Auto merge of #2755 - matklad:remove-useless-formats, r=alexcrichton

Remove useless format calls from tests

9 years agoAuto merge of #2752 - wesleywiser:patch-1, r=alexcrichton
bors [Tue, 31 May 2016 03:32:21 +0000 (20:32 -0700)]
Auto merge of #2752 - wesleywiser:patch-1, r=alexcrichton

Fix example in cargo manpage

Fixes #2731

9 years agoRemove useless format calls from tests
Aleksey Kladov [Mon, 30 May 2016 22:41:36 +0000 (01:41 +0300)]
Remove useless format calls from tests

9 years agoFix example in cargo manpage
Wesley Wiser [Sun, 29 May 2016 23:18:59 +0000 (19:18 -0400)]
Fix example in cargo manpage

Fixes #2731

9 years agoRename main thread from '<main>' to 'main'.
Wangshan Lu [Sat, 28 May 2016 10:05:58 +0000 (18:05 +0800)]
Rename main thread from '<main>' to 'main'.

This pull request resolves the test failure in rust pull request 33803

9 years agoAuto merge of #2742 - alexcrichton:new-error-format, r=wycats
bors [Fri, 27 May 2016 00:14:54 +0000 (17:14 -0700)]
Auto merge of #2742 - alexcrichton:new-error-format, r=wycats

Fix tests for RUST_NEW_ERROR_FORMAT

A few tests were a bit too strict in the output they were looking for, this
instead relaxes some assertions to just what we're interested in.

9 years agoAuto merge of #2744 - alexcrichton:bump, r=alexcrichton
bors [Thu, 26 May 2016 16:37:11 +0000 (09:37 -0700)]
Auto merge of #2744 - alexcrichton:bump, r=alexcrichton

Bump version numbers

Working on 0.12.0 now

9 years agoBump version numbers
Alex Crichton [Thu, 26 May 2016 16:36:37 +0000 (09:36 -0700)]
Bump version numbers

Working on 0.12.0 now

9 years agoFix tests for RUST_NEW_ERROR_FORMAT
Alex Crichton [Wed, 25 May 2016 17:04:39 +0000 (10:04 -0700)]
Fix tests for RUST_NEW_ERROR_FORMAT

A few tests were a bit too strict in the output they were looking for, this
instead relaxes some assertions to just what we're interested in.

9 years agoAuto merge of #2743 - alexcrichton:better-test-suite, r=alexcrichton
bors [Thu, 26 May 2016 04:54:45 +0000 (21:54 -0700)]
Auto merge of #2743 - alexcrichton:better-test-suite, r=alexcrichton

Split the test suite into multiple binaries

Helps reduce compile time of tests, more ergonomic names to type, more conventional configuration, and makes it basically easier to work with.

The previous `support` module is now a separate `cargotest` crate.

9 years agoShared the test suite into multiple binaries
Alex Crichton [Thu, 26 May 2016 00:06:25 +0000 (17:06 -0700)]
Shared the test suite into multiple binaries

Compiling everything in one binary was getting annoying as it just took forever
to build, instead shard it all up so we can build just particular test suites at
a time.

9 years agoRemove the test! macro
Alex Crichton [Wed, 25 May 2016 20:55:42 +0000 (13:55 -0700)]
Remove the test! macro

This isn't really necessary and we can do setup manually in a few cases and
lazily do it in all the others.

9 years agoAuto merge of #2739 - alexcrichton:configure-colors, r=alexcrichton
bors [Tue, 24 May 2016 20:03:39 +0000 (13:03 -0700)]
Auto merge of #2739 - alexcrichton:configure-colors, r=alexcrichton

Configure colors of both stdout/stderr

Previously color configuration only affected stdout, not stder as well.

Closes #2734

9 years agoConfigure colors of both stdout/stderr
Alex Crichton [Tue, 24 May 2016 18:52:31 +0000 (11:52 -0700)]
Configure colors of both stdout/stderr

Previously color configuration only affected stdout, not stder as well.

Closes #2734

9 years agoAuto merge of #2737 - aidanhs:aphs-hash-url-serialization, r=alexcrichton
bors [Tue, 24 May 2016 18:49:48 +0000 (11:49 -0700)]
Auto merge of #2737 - aidanhs:aphs-hash-url-serialization, r=alexcrichton

Hash url serialization to ensure hash stability

`as_str` is documented to return the serialization of a url (http://servo.github.io/rust-url/url/struct.Url.html#method.as_str).
The serialization of a url has a spec (https://url.spec.whatwg.org/#url-serializing).

Hashing the serialization of a url insulates cargo against possible decisions to alter how rust-url does hashing (I've observed it happening twice). Note that rust-url happens to do this internally (but is not guaranteed to in future) and so this change doesn't actually have any effect on hash values.

r? @alexcrichton

Closes #1710

9 years agoHash url serialization to ensure hash stability
Aidan Hobson Sayers [Tue, 24 May 2016 13:29:52 +0000 (14:29 +0100)]
Hash url serialization to ensure hash stability

Closes #1710

9 years agoAuto merge of #2730 - alexcrichton:fix-panic-abort-build-script, r=alexcrichton
bors [Mon, 23 May 2016 20:49:01 +0000 (13:49 -0700)]
Auto merge of #2730 - alexcrichton:fix-panic-abort-build-script, r=alexcrichton

Fix build scripts and panic=abort

Build scripts were apparently always compiled with the "dev" profile rather than
the standard "match whatever the normal build was" profile, which meant that if
dev/release disagreed on panic=abort you'd get compile errors. Seems bad!

This commit fixes this by just having build scripts always compile with the same
profile as libraries (for now), as this was the original intention anyway.

Closes #2726

9 years agoFix build scripts and panic=abort
Alex Crichton [Mon, 23 May 2016 15:44:27 +0000 (08:44 -0700)]
Fix build scripts and panic=abort

Build scripts were apparently always compiled with the "dev" profile rather than
the standard "match whatever the normal build was" profile, which meant that if
dev/release disagreed on panic=abort you'd get compile errors. Seems bad!

This commit fixes this by just having build scripts always compile with the same
profile as libraries (for now), as this was the original intention anyway.

Closes #2726

9 years agoAuto merge of #2687 - alexcrichton:panic-abort, r=wycats
bors [Sat, 21 May 2016 01:52:38 +0000 (18:52 -0700)]
Auto merge of #2687 - alexcrichton:panic-abort, r=wycats

Implement the `panic` profile option

This is the Cargo half of the implementation of [RFC 1513] which adds a new
`profile.*.panic` option to customize the `-C panic` argument to the compiler.
This is not passed by default and can otherwise be specified as `abort` or
`unwind` on the nightly compiler.

[RFC 1513]: https://github.com/rust-lang/rfcs/pull/1513

The `profile.*.panic` option is *only* used from the top-level crate, not each
crate individually. This means that applications should customize this value as
they see fit, and libraries will only use their own value when they're being
tested.

Cargo also has specific knowledge that when *testing* a crate it can't pass
`-C panic=abort` for now as the default test harness requires `panic=unwind`.
This essentially just means that `cargo test` will continue to work for crates
that specify `panic=abort` in Cargo.toml.

9 years agoImplement the `panic` profile option
Alex Crichton [Fri, 13 May 2016 18:35:52 +0000 (11:35 -0700)]
Implement the `panic` profile option

This is the Cargo half of the implementation of [RFC 1513] which adds a new
`profile.*.panic` option to customize the `-C panic` argument to the compiler.
This is not passed by default and can otherwise be specified as `abort` or
`unwind` on the nightly compiler.

[RFC 1513]: https://github.com/rust-lang/rfcs/pull/1513

The `profile.*.panic` option is *only* used from the top-level crate, not each
crate individually. This means that applications should customize this value as
they see fit, and libraries will only use their own value when they're being
tested.

Cargo also has specific knowledge that when *testing* a crate it can't pass
`-C panic=abort` for now as the default test harness requires `panic=unwind`.
This essentially just means that `cargo test` will continue to work for crates
that specify `panic=abort` in Cargo.toml.

9 years agoAuto merge of #2723 - alexcrichton:override-errors, r=wycats
bors [Fri, 20 May 2016 23:56:13 +0000 (16:56 -0700)]
Auto merge of #2723 - alexcrichton:override-errors, r=wycats

Don't throw away errors with `-p` arguments

This was unfortunately ignoring errors which would helpfully tell you how to
rerun a command with a more precise specification.

Closes #2641

9 years agoDon't throw away errors with `-p` arguments
Alex Crichton [Fri, 20 May 2016 21:25:43 +0000 (14:25 -0700)]
Don't throw away errors with `-p` arguments

This was unfortunately ignoring errors which would helpfully tell you how to
rerun a command with a more precise specification.

Closes #2641

9 years agoAuto merge of #2722 - alexcrichton:stderr-not-stdout, r=alexcrichton
bors [Fri, 20 May 2016 21:09:55 +0000 (14:09 -0700)]
Auto merge of #2722 - alexcrichton:stderr-not-stdout, r=alexcrichton

Report status to stderr -- last few tests

Fixup of #2693 for the last few tests.

9 years agoFix up last few remaining tests status-to-stderr
Alex Crichton [Fri, 20 May 2016 16:23:50 +0000 (09:23 -0700)]
Fix up last few remaining tests status-to-stderr

9 years agoMerge branch 'status-2-stderr' of https://github.com/matklad/cargo into stdout-not...
Alex Crichton [Fri, 20 May 2016 16:08:48 +0000 (09:08 -0700)]
Merge branch 'status-2-stderr' of https://github.com/matklad/cargo into stdout-not-stderr

9 years agofix cargo_compile_path_deps
Aleksey Kladov [Fri, 20 May 2016 14:19:49 +0000 (17:19 +0300)]
fix cargo_compile_path_deps

9 years agofix test_cargo_publish
Aleksey Kladov [Fri, 20 May 2016 14:00:15 +0000 (17:00 +0300)]
fix test_cargo_publish

9 years agofix test_cargo_freshness
Aleksey Kladov [Fri, 20 May 2016 13:54:01 +0000 (16:54 +0300)]
fix test_cargo_freshness

9 years agofix test_compile_git_deps
Aleksey Kladov [Fri, 20 May 2016 13:39:58 +0000 (16:39 +0300)]
fix test_compile_git_deps

9 years agofix some cargo_compile tests
Aleksey Kladov [Fri, 20 May 2016 13:22:58 +0000 (16:22 +0300)]
fix some cargo_compile tests

9 years agofix test_cargo_bench
Aleksey Kladov [Fri, 20 May 2016 12:02:09 +0000 (15:02 +0300)]
fix test_cargo_bench

9 years agofix test_cargo_overrides
Aleksey Kladov [Fri, 20 May 2016 11:47:39 +0000 (14:47 +0300)]
fix test_cargo_overrides

9 years agoone more regexp
Aleksey Kladov [Fri, 20 May 2016 01:07:54 +0000 (04:07 +0300)]
one more regexp

9 years agofix test_cargo_package
Aleksey Kladov [Fri, 20 May 2016 00:52:13 +0000 (03:52 +0300)]
fix test_cargo_package

9 years agofix test_cargo_registry
Aleksey Kladov [Fri, 20 May 2016 00:21:55 +0000 (03:21 +0300)]
fix test_cargo_registry

9 years agoAuto merge of #2719 - semarie:test-git-vcs, r=alexcrichton
bors [Thu, 19 May 2016 22:00:03 +0000 (15:00 -0700)]
Auto merge of #2719 - semarie:test-git-vcs, r=alexcrichton

PR #1124 have replaced `git` with `vcs`

changes test_cargo_new::author_prefers_cargo to testing configuration
with `vcs`

9 years agoPR #1124 have replaced `git` with `vcs`
Sébastien Marie [Thu, 19 May 2016 19:42:32 +0000 (21:42 +0200)]
PR #1124 have replaced `git` with `vcs`

changes test_cargo_new::author_prefers_cargo to testing configuration
with `vcs`

9 years agomore auto refactoring fixes
Aleksey Kladov [Thu, 19 May 2016 00:51:07 +0000 (03:51 +0300)]
more auto refactoring fixes

9 years agofix more tests with auto refactoring
Aleksey Kladov [Thu, 19 May 2016 00:02:41 +0000 (03:02 +0300)]
fix more tests with auto refactoring

9 years agomore regexp fixes
Aleksey Kladov [Wed, 18 May 2016 23:41:30 +0000 (02:41 +0300)]
more regexp fixes

9 years agofix test_cargo_install
Aleksey Kladov [Sun, 15 May 2016 22:16:54 +0000 (01:16 +0300)]
fix test_cargo_install

9 years agofix exit_code tests
Aleksey Kladov [Sun, 15 May 2016 22:03:35 +0000 (01:03 +0300)]
fix exit_code tests

9 years agofix more tests
Aleksey Kladov [Sun, 15 May 2016 21:48:11 +0000 (00:48 +0300)]
fix more tests

9 years agofix more test with insane regexes
Aleksey Kladov [Sun, 15 May 2016 21:26:24 +0000 (00:26 +0300)]
fix more test with insane regexes

9 years agofix more tests with regex
Aleksey Kladov [Sun, 15 May 2016 21:17:56 +0000 (00:17 +0300)]
fix more tests with regex

9 years agofix test_cargo_test
Aleksey Kladov [Sun, 15 May 2016 21:07:04 +0000 (00:07 +0300)]
fix test_cargo_test

9 years agofix some tests with IntelliJ-Rust automated refactoring
Aleksey Kladov [Sun, 15 May 2016 01:11:00 +0000 (04:11 +0300)]
fix some tests with IntelliJ-Rust automated refactoring

9 years agofix some more tests with regexp
Aleksey Kladov [Sat, 14 May 2016 21:44:18 +0000 (00:44 +0300)]
fix some more tests with regexp

9 years agofix a bunch of tests with regexp
Aleksey Kladov [Sat, 14 May 2016 21:15:22 +0000 (00:15 +0300)]
fix a bunch of tests with regexp